/*
 * Copyright 2002-2015 the Beijing Brain Technology co.,LTD http://www.bris.cn/
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bris.niosocket.message;

import java.nio.ByteBuffer;

/**
 * 解码接口,定义基本的解码规则,负责将消息解码成上层数据</br>
 * 2015年11月27日</br>
 * @author xunaidong
 * @since 1.0.0
 */
public interface Decodeable extends Codecable {
	

    /**
     * 将底层数据解码成上层数据. <br/> 
     * @author xunaidong 
     * @param packet
     * @return 消息数据
     * @since 1.0.0
     */
    IMessage decode(ByteBuffer packet) throws CspEncodingException;

}
